﻿using Cls_BoticasySaludBE;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;

namespace WcfServicioComunicacionByS
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IRestServiceImpl" in both code and config file together.
    [ServiceContract]
    public interface IRestServiceImpl
    {
        [OperationContract]
        [WebInvoke(Method="GET",
            ResponseFormat=WebMessageFormat.Xml,
            BodyStyle=WebMessageBodyStyle.Wrapped,
            UriTemplate = "xm/{id}")]
        string XMLData(string id);

        [OperationContract]
        [WebInvoke(Method = "GET",
            ResponseFormat = WebMessageFormat.Json,
            BodyStyle = WebMessageBodyStyle.Wrapped,
            UriTemplate = "jso/{id}")]
        string JSONData(string id);

        //[OperationContract]
        //[WebInvoke(Method = "POST", 
        //    BodyStyle = WebMessageBodyStyle.Wrapped, 
        //    ResponseFormat = WebMessageFormat.Json,
        //    UriTemplate = "jsonInsertar/{pedido}")]
        ////LodgeLevel[] GetLodgeLevels(string Id);
        ////string InsertPedido(Pedido pedido);
        [OperationContract]
        [WebInvoke(Method = "*", 
            RequestFormat = WebMessageFormat.Json, 
            ResponseFormat = WebMessageFormat.Json, 
            BodyStyle = WebMessageBodyStyle.Bare, 
            UriTemplate = "Pedido/InsertPedido")]
        string InsertPedido(Pedido pedido);

        //UriTemplate="GetDataUsingDataContract?composite={composite}", 
        //BodyStyle=WebMessageBodyStyle.Wrapped, 
        //RequestFormat=WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json

        //[OperationContract]
        //[WebInvoke(Method = "GET",
        //    ResponseFormat = WebMessageFormat.Json,
        //    BodyStyle = WebMessageBodyStyle.Wrapped,
        //    UriTemplate = "json/?data={data}")]
        //bool InsertarPedido(Pedido data);

        //Store proc ConsultarPosicionActual()

        /*
         Alter proc ConsultarPosicionActual  
	        @CodCliente int
          as
	        Select Latitud,Altitud from pedido
	        where idcliente = @codCliente
	
         */


    }
}
